Wayland: ignore touch/tablet events on destroyed surfaces
authorwisp3rwind <wisp3rwind@posteo.eu>
Wed, 11 Nov 2020 09:12:26 +0000 (10:12 +0100)
committerwisperwind <wisp3rwind@posteo.eu>
Sun, 10 Jan 2021 11:31:37 +0000 (12:31 +0100)
commit8312b9d9ca439257a3c3cb3810a379abbc59f37d
treed2173eff270cbcb22d4a41dbc65900d0580e12ba
parent60835227a1ff24512c98b2da608979b426329d87
Wayland: ignore touch/tablet events on destroyed surfaces

When destroying a wl_surface (e.g. when a window or menu is closed), the
surface may continue to exist in the compositor slightly longer than on
the client side. In that case, the surface can still receive input
events, which need to be ignored gracefully.
In particular, this prevents segfaulting on wl_surface_get_user_data()
in that situation.

Reported in
https://gitlab.gnome.org/GNOME/gtk/-/issues/3296

The same issue for pointers/keyboards was reported in
https://bugzilla.gnome.org/show_bug.cgi?id=693338

and fixed with in
bfd7137ffbcbd8caa531d7a47d799fefb6605a5a
3625f17857328ae7e7aa43340f29efa56575a7b0
a8fc099a725543649fe3aab76943c14bdcd860fc
gdk/wayland/gdkdevice-wayland.c